#ifndef _MPEPANEL_H
#define _MPEPANEL_H

#include "wx/wxprec.h"
#include "wx/tokenzr.h"
#include "wx/grid.h"
#include "wx/textfile.h"
#ifndef WX_PRECOMP
  #include "wx/wx.h"
#endif

#ifndef MPE_GRID_ROWS
  #define MPE_GRID_ROWS 3
#endif

#ifndef MPE_GRID_COLS
  #define MPE_GRID_COLS 2
#endif

#ifndef MPE_GRID_VGAP
  #define MPE_GRID_VGAP 5
#endif

#ifndef MPE_GRID_HGAP
  #define MPE_GRID_HGAP 5
#endif

#include "PreprocessorDefines.h"

class FileGrid;

class MPEPanel : public wxPanel
{
  public:
    MPEPanel(wxWindow* parent);
    ~MPEPanel();
    DECLARE_EVENT_TABLE()

  private:
    wxBoxSizer            *m_pBoxSizer;
    wxFlexGridSizer       *m_pFlexGridSizer;

    wxString               m_pMasterFile;  // MPE file for loading the rest
    wxGrid                *m_pMasterGrid;
    wxStaticText          *m_pScenarioLabel;
    wxGrid                *m_pScenarioGrid;
    wxStaticText          *m_pAMLabel;
    wxGrid                *m_pAMGrid; // Assessment model grid
    wxStaticText          *m_pHCRLabel;
    wxGrid                *m_pHCRGrid; // Harvest control rule grid
    wxStaticText          *m_pDRLabel;
    wxGrid                *m_pDRGrid;  // Data rule grid
    wxStaticText          *m_pSelectivityLabel;
    wxGrid                *m_pSelectivityGrid;
    wxStaticText          *m_pGearsLabel;
    wxGrid                *m_pGearsGrid;
    wxStaticText          *m_pNULLLabel;
    wxTextFile             m_pScenarioFile;
    wxString               m_pCurrentDocPath;

    void loadMPE(wxString filename);
    void loadFileIntoGrid(wxGrid*& grid, wxString filename);
    void placeLabel(wxStaticText*& label, wxString text);
    void placeGrid(wxGrid*& grid, wxString filename);
};
#endif //_MPEPANEL_H
